import axios from 'axios';
import {API_NEW_VERSION} from '../api';

export const searchRoles = params => {
  return axios.get(API_NEW_VERSION + 'roles', {params: params});
};

export const saveRole = params => {
  return axios.post(API_NEW_VERSION + 'roles', params);
};

export const deleteRoles = ids => {
  return axios.delete(API_NEW_VERSION + 'roles/' + ids);
};

export const orgRoleTree = () => {
  return axios.get(API_NEW_VERSION + 'role_organization_tree');
};
